#include "sidemenu.h"

sideMenu::sideMenu(sf::RenderWindow& window)
{
    int outlineThickness = 3;
    xPos = window.getSize().x * 0.75;  //75% of screen
    yPos = outlineThickness;

    boxWidth = window.getSize().x * 0.25 - 2 * outlineThickness;  //25% of screen - 2X thickness
    boxHeight = window.getSize().y - 2 * outlineThickness;

    fontSize = 20;

    menuRect.setSize(sf::Vector2f(boxWidth,boxHeight));
    menuRect.setPosition(xPos,yPos);
    menuRect.setFillColor(sf::Color::Black);
    menuRect.setOutlineThickness(outlineThickness);
    menuRect.setOutlineColor(sf::Color::White);

    font.loadFromFile("resources/arial.ttf");

    messageText.setString("In the area:");
    messageText.setFont(font);
    messageText.setCharacterSize(fontSize);
    //headerText.setStyle(sf::Text::Bold);
    messageText.setColor(sf::Color::Green);
    messageText.setPosition(xPos + boxWidth / 2 - messageText.getGlobalBounds().width / 2 , yPos);   //ctor
}

sideMenu::~sideMenu()
{
    //dtor
}


void sideMenu::Render(sf::RenderWindow& window){

        window.draw(menuRect);
        window.draw(messageText);

}
